<template>
  <div>
    My页面 - {{ $route.params.username }} —— {{ $route.params.age }}---
    {{ $route.query.a }} - {{ $route.query.b }}
  </div>
</template>

<script setup>
import { onMounted } from "vue";
import { useRoute } from "vue-router";
const route = useRoute();

onMounted(() => {
  console.log(route.params);
  console.log(route.query);
});
</script>

<style lang="scss" scoped>
</style>